From 3cd4abc85e3b0537860f5f82f05027488b37b3bf Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 2 Jan 2006 00:04:28 +0000 Subject: [PATCH] explicit limits for subqueries, MySQL doesn't seem to be able to work this out --- includes/SpecialWhatlinkshere.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index 1ca9698332..4738ab857d 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -113,9 +113,9 @@ class WhatLinksHerePage { // with an is_template field in the output indicating which one the link // came from $sql = "(SELECT page_id,page_namespace, page_title, page_is_redirect, 1 as is_template " . - "FROM page, templatelinks WHERE $tlCond $offsetCond) " . + "FROM page, templatelinks WHERE $tlCond $offsetCond $options) " . "UNION (SELECT page_id,page_namespace, page_title, page_is_redirect, 0 as is_template " . - "FROM page, pagelinks WHERE $plCond $offsetCond) $options"; + "FROM page, pagelinks WHERE $plCond $offsetCond $options) $options"; $res = $dbr->query( $sql, $fname ); $numRows = $dbr->numRows( $res ); -- 2.20.1